package com.ailk.cuc.autotestbg.common.utils;

import org.apache.commons.logging.Log;

import com.ailk.cuc.autotestbg.common.business.interf.BusinessProcessInterface;
import com.ailk.cuc.autotestbg.xml.constants.EssEcsConstants;

public class BusiProcesserFactory {

	private static Log logger = LogUtils.getLogger(BusiProcesserFactory.class.getName());
	public static BusinessProcessInterface getBusiProcesser(String type){
		BusinessProcessInterface busiProcesser = null;
		if(EssEcsConstants.XML_BUSI_PROCESSER_TYPE_ECS.equals(type)){
			busiProcesser = (BusinessProcessInterface)SpringContextUtil.getBean("ecsProcesser");
		}else{
			busiProcesser = (BusinessProcessInterface)SpringContextUtil.getBean("essProcesser");
		}
		logger.debug("EssEcsConstants.XML_BUSI_PROCESSER_TYPE_ECS : "+type);
		return busiProcesser;
	}
	
	private BusiProcesserFactory(){}
}
